<?php
/**
 * Xml.php
 *
 * @category    Madoqua
 * @package     Module
 * @subpackage  BlogAdmin
 */

/** base class*/
require_once 'Madoqua/Form.php';

/**
 * BlogAdmin_Settings_Xml
 *
 * @category    Madoqua
 * @package     Module
 * @subpackage  BlogAdmin
 */
class BlogAdmin_Settings_Xml extends Madoqua_Form
{
    /**
     * constructor
     */
    public function __construct() {
        parent::__construct();
        
        $this->addElement('textarea', 'xml', array(
            'label' => 'Raw XML',
            'required' => true,
            'validators' => array(
                array('StringLength', 1)
                //that's a lot of checking ;) 
            ),
            'filters' => array(
                'StringTrim'
            )
        ));
        //hidden reset
        $this->getElement('xml')->clearFilters();
        
        $this->addElement('submit', 'submit', array(
            'label' => 'Save Xml'
        ));
        //submit        
    }
}